import request from '@/utils/request'
//分类列表
export function listCategory(query) {
    return request({
        url: '/technology/technologyMaterialCategory/list',
        method: 'get',
        params: query
    })
}
export function getCategory(id) {
    return request({
        url: '/technology/technologyMaterialCategory/'+id,
        method: 'get'
    })
}

export function addCategory(data) {
    return request({
        url: '/technology/technologyMaterialCategory/',
        method: 'post',
        data: data
    })
}

export function updateCategory(data) {
    return request({
        url: '/technology/technologyMaterialCategory',
        method: 'put',
        data: data
    })
}

export function delCategory(materialId) {
    return request({
        url: '/technology/technologyMaterialCategory/' + materialId,
        method: 'delete'
    })
}
// 查询工艺管理 材料信息列表
export function listMaterial(query) {
    return request({
        url: '/technology/technologyMaterial/list',
        method: 'get',
        params: query
    })
}

// 查询工艺管理 材料信息详细
export function getMaterial(materialId) {
    return request({
        url: '/technology/technologyMaterial/' + materialId,
        method: 'get'
    })
}

// 新增工艺管理 材料信息
export function addMaterial(data) {
    return request({
        url: '/technology/technologyMaterial',
        method: 'post',
        data: data
    })
}

// 修改工艺管理 材料信息
export function updateMaterial(data) {
    return request({
        url: '/technology/technologyMaterial',
        method: 'put',
        data: data
    })
}

// 删除工艺管理 材料信息
export function delMaterial(materialId) {
    return request({
        url: '/technology/technologyMaterial/' + materialId,
        method: 'delete'
    })
}
// 查询工艺管理 材料参数列表
export function getMaterialInfo(query) {
    return request({
        url: '/technology/technologyWorkingMaterialParam/list',
        method: 'get',
        params: query
    })
}
// 查询工艺管理 材料历史价格
export function getMaterialPrice(query) {
    return request({
        url: '/technology/technologyWorkingMaterialPrice/historyList',
        method: 'get',
        params: query
    })
}